/**
 * 
 */
package br.embedded.ufcg.rmi;

/**
 * @author Daniel
 *
 */
public class Monitor extends Thread {

	private Server theServerRef;
	
	public Monitor(Server theServerRef)
	{
		super();
		this.theServerRef = theServerRef;
	}
	
	@Override
	public void run()
	{
		while (!theServerRef.checkConnections())
		{
			try {
				sleep(100);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
		theServerRef.shutdown();
	}
}
